<%@page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%
	String path =request.getContextPath();
	request.setAttribute("qryCondOrderForm",request.getAttribute("qryCondOrderForm"));
	request.setAttribute("qryResultOrderForms",request.getAttribute("qryResultOrderForms"));
%>
<head>
<title>UFIDA NC 电子商务采购平台</title>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script language="javascript" type="text/javascript" src="<%=path%>/js/validatorTool.js"></script>
	<script language="javascript" type="text/javascript" src="<%=path%>/js/utilTool.js"></script>
     <script language="javascript" type="text/javascript">
	    function goback(){
	  		var url = "<%=path%>/order/goBack2OrderConfirm";
			location.href = url;
	  	}

	    //暂存的订单
        function saveOrder() {
        	var confirmNums=document.getElementsByName("confirmNum");
            var confirmPrices=document.getElementsByName("confirmPrice");
            var confirmArrDates=document.getElementsByName("confirmArrDate");
            var planArrDatedds=document.getElementsByName("planArrDatedd");
            for ( var i = 0; i < confirmNums.length; i++) {
				var confirmNum=trim(confirmNums[i].value);
				var confirmPrice=trim(confirmPrices[i].value);
				var confirmArrDate=trim(confirmArrDates[i].value);
				var planArrDateddss=trim(planArrDatedds[i].value);
				if(confirmNum==null || confirmNum==""){
					alert("第"+(i+1)+"行确认数量不能为空");
					confirmNums[i].focus();
					return ;
				}
				if(confirmPrice==null || confirmPrice==""){
					alert("第"+(i+1)+"行确认单价不能为空");
					confirmPrices[i].focus();
					return ;
				}
				if(confirmArrDate==null || confirmArrDate==""){
					alert("第"+(i+1)+"行订单确认日期不能为空");
					confirmArrDates[i].focus();
					return ;
				}
				if((confirmArrDate.replace(/-/g,"")) < (planArrDateddss.replace(/-/g,""))){ 
					var fdsafsa = document.getElementById("message");
					fdsafsa.innerHTML = "第" +(i+1)+"行 确认计划到货日期"+confirmArrDate+"不能早于订单计划到货日期"+planArrDateddss+"";
					confirmArrDates[i].focus();
					return ;
				}
			}
        	form.action="<%=path%>/order/saveOrder";
        	form.submit();
        }

	    //提交暂存的订单
        function submitOrder() {
            var confirmNums=document.getElementsByName("confirmNum");
            var confirmPrices=document.getElementsByName("confirmPrice");
            var confirmArrDates=document.getElementsByName("confirmArrDate");
            var planArrDatedds=document.getElementsByName("planArrDatedd");
            
            for ( var i = 0; i < confirmNums.length; i++) {
				var confirmNum=trim(confirmNums[i].value);
				var confirmPrice=trim(confirmPrices[i].value);
				var confirmArrDate=trim(confirmArrDates[i].value);
				var planArrDateddss=trim(planArrDatedds[i].value);
				
				if(confirmNum==null || confirmNum==""){
					alert("第"+(i+1)+"行确认数量不能为空");
					confirmNums[i].focus();
					return ;
				}
				if(confirmPrice==null || confirmPrice==""){
					alert("第"+(i+1)+"行确认单价不能为空");
					confirmPrices[i].focus();
					return ;
				}
				if(confirmArrDate==null || confirmArrDate==""){
					alert("第"+(i+1)+"行订单确认日期不能为空");
					confirmArrDates[i].focus();
					return ;
				}

		            
				if((confirmArrDate.replace(/-/g,"")) < (planArrDateddss.replace(/-/g,""))){ 
					var fdsafsa = document.getElementById("message");
					fdsafsa.innerHTML = "第" +(i+1)+"行 确认计划到货日期"+confirmArrDate+"不能早于订单计划到货日期"+planArrDateddss+"";
					return ;
				}
				// 提交的时候处理一下订单数量、单价、时间（需求和测试2012-08-17商量的结果）
				/**
				document.getElementById("orderNumbj" + (i+1)).innerHTML = confirmNum;
				document.getElementById("taxPricebj" + (i+1)).innerHTML = confirmPrice;
				document.getElementById("planArrDatebj" + (i+1)).innerHTML = confirmArrDate;
				*/
			}
        	form.action="<%=path%>/order/cmtUptOrderOnSave";
        	form.submit();
        }

	    //删除暂存的订单
        function deleteOrder(pkOrder,pkWebOrder){
        	url = "<%=path%>/order/deleteSavedOrder?pkWebOrder="+pkWebOrder+"&pkOrder="+pkOrder;
        	location.href = url;
        }
        
        function doCalPrice(changeKey,index){
			//计算行号
			var editRow = 0;
			editRow = index-1;
			//物料主健
			var prodPks = document.getElementsByName("pkProd");
			if(prodPks.length > editRow){
				document.calpriceform.pk_prod_cal.value = prodPks[editRow].value;
			}
			//报价单位
			var prodUnitPks = document.getElementsByName("pkMeasure");
			if(prodUnitPks.length > editRow){
				document.calpriceform.pk_unit_cal.value = prodUnitPks[editRow].value;
			}
			//主单位
			//var mainUnitPks = document.getElementsByName("main_unit");
			//if(mainUnitPks.length > editRow){
			//	document.calpriceform.pk_primary_unit_cal.value = mainUnitPks[editRow].value;
			//}
			//币种
			var pkCurrencys = document.getElementsByName("pkCurrency");
			if(pkCurrencys.length > editRow){
				document.calpriceform.pk_currency_cal.value = pkCurrencys[editRow].value;
			}
			// 币种名称
			var curNames = document.getElementsByName("curName");
			if(curNames.length > editRow){
				document.calpriceform.curName_cal.value = curNames[editRow].value;
			}
			//确认数量
			var amounts = document.getElementsByName("confirmNum"); 
			var taxNums = document.getElementsByName("taxNum"); 
			//主数量
			var newamounts = amounts[editRow].value;
			if(amounts[editRow].value == null || amounts[editRow].value==""){
<%--				//确认含税单价--%>
<%--				var hasTaxPricesnew = document.getElementsByName("confirmPrice");--%>
<%--				//含税净价--%>
<%--				var hasTaxNetPricenew = document.getElementById("netTaxPrice1"+index);--%>
<%--				hasTaxNetPricenew.innerHTML = hasTaxPricesnew[editRow].value;--%>
<%--				document.calpriceform.has_tax_net_price_cal.value=hasTaxNetPricenew.innerHTML;--%>
<%--				document.calpriceform.conversion_rate_cal.value="1/1";--%>
<%--				return ;	--%>
				newamounts = 0;
			}
			if(!(taxNums[editRow].value == null || taxNums[editRow].value=="")){
				newamounts = newamounts * taxNums[editRow].value;
			}
			document.calpriceform.amount_cal.value = newamounts;
			document.calpriceform.primary_amount_cal.value = newamounts;

			//确认含税单价
			var hasTaxPrices = document.getElementsByName("confirmPrice");
			if(hasTaxPrices[editRow].value == null || hasTaxPrices[editRow].value==""){
				var hasTaxPricesnew = document.getElementsByName("confirmPrice");
				//含税净价
				var hasTaxNetPricenew = document.getElementById("netTaxPrice1"+index);
				hasTaxNetPricenew.innerHTML = hasTaxPricesnew[editRow].value;
				return ;	
			}
			document.calpriceform.has_tax_price_cal.value = hasTaxPrices[editRow].value;


			
			//无税净价
			//var noTaxNetPrices = document.getElementsByName("disct_taxless_price");
			//document.calpriceform.no_tax_net_price_cal.value=noTaxNetPrices[editRow].value;
			
			//含税净价
			var hasTaxNetPrice = document.getElementById("netTaxPrice1"+index);
			document.calpriceform.has_tax_net_price_cal.value=hasTaxNetPrice.innerHTML;
			document.calpriceform.conversion_rate_cal.value="1/1";
		
			
			//主无税净价
			//var mainTfPrices = document.getElementsByName("main_tf_price");
			//document.calpriceform.primary_notax_net_price_cal.value = mainTfPrices[editRow].value;
			//主含税单价
			//var mainTaxPrices = document.getElementsByName("main_tax_price");
			//document.calpriceform.primary_hastax_net_price_cal.value = mainTaxPrices[editRow].value;
			
			//税率
			var taxRate = document.getElementById("rate1"+index);
			if(taxRate.innerText == "" || taxRate.innerText == null){
				taxRate.innerText = "0.00";
			}
			document.calpriceform.tax_rate_cal.value = taxRate.innerHTML;
			//折扣率
			var discountRate = document.getElementById("discount1"+index);
			if(discountRate.innerText == "" || discountRate.innerText == null){
				return;
			}
			document.calpriceform.discount_rate_cal.value = discountRate.innerHTML;
			
			//触发计算的字段为: changeKey
			document.calpriceform.property_cal.value= changeKey;
			//设置参数:无税优先，其他参数不设置，用默认值
			//document.calpriceform.isTaxPrior.value="false"; 
			//行号
			document.calpriceform.row_no.value = index - 1;
			
			//提交表单
			var options2 = {
				beforeSubmit : showRequest2, 
				success : showResponse2
			};
			$('#calpriceform').ajaxSubmit(options2);
		}
			
		function showRequest2(formData, jqForm, options) {
		}
			
		function showResponse2(responseText, statusText, xhr, $form) {
			// 0:报价数量|1:税率|2:折扣率|3:含税单价|4:价税合计|5:含税净价|6:主含税净价|7:无税单价|8:无税金额|9:无税净价|10:主无税净价|11:税e|12:行号|13:换算率|14:主数量
			var responseArr = responseText.split("|");
			//价税合计
			var index=++responseArr[12];
			var noTaxPrice = document.getElementById("priceTaxTotal1"+index);


			if(responseArr[4] == 0.00 || responseArr[4] == "null"){
<%--				var newvalue = subRedubqNum(responseArr[4],3);--%>
				responseArr[4] = "";
			}
			
			noTaxPrice.innerHTML = responseArr[4];
			var noTaxPrices=document.getElementsByName("priceTaxTotal");
			noTaxPrices[index-1].value=responseArr[4];
			//税e
			var taxNums = document.getElementById("taxNum1"+index);
		//	taxNums.innerHTML = responseArr[11];
			var taxNumses=document.getElementsByName("taxNum");
			//taxNumses[index-1].value=responseArr[11];
			
			//净含税单价
			var netTaxPrice1 = document.getElementById("netTaxPrice1"+index);
			if(responseArr[5] == 0.00 || responseArr[5] == "null"){
				responseArr[5] = "";
			}

			netTaxPrice1.innerHTML = responseArr[5];
			var netTaxPrice1s=document.getElementsByName("netTaxPrice");
			netTaxPrice1s[index-1].value=responseArr[5];
		}
		 function onKeyDownEnter(dwji,fiewji){
			//	var vvv = /^[0-9]+(.[0-9]{fiewji})?$/g;
				//var old =dwji.value;
				//if(!vvv.test(dwji.value)){
			//		dwji.value = old;
			//	}
				
			}
     </script>
    
</head>
<body class="fullbody">
        <div class="context">
        	<div class="position">
            	<div class="tposi">当前位置： 
                    	<a href="javascript:changeMenu(1,'<%=path%>/infopub/pubmain?menuid=1');" class="linkstyle">首页</a>&nbsp;&gt;&gt;&nbsp;
                       	<a href="javascript:changeMenu(3,'');" class="linkstyle">我的订单\合同</a>&nbsp;&gt;&gt;&nbsp; 
                        <span class="curposition">订单确认</span>
                </div>
                <div class="help">
					<a href="javascript:void(null);" onclick="doHelp('<%=request.getContextPath()%>/help/html/DDQR.html');" class="linkstyle">帮助</a>
				</div>
            </div>
                <div class="margin8"></div>
                <div class="subpage_title">
                    <div class="title_index">
                        <img src="<%=path%>/images/common/dot03.gif" alt="" border="0" />&nbsp;订单确认
                    </div>
                </div>
                <div class="margin20"></div>
                <div class="subpage_bidlist">
                    <div>
                         <div >
		                    <div class="title_index">
		                    	
		                    	<!-- 计算用的form -->
								<form id="calpriceform" name="calpriceform" method="post"
									action="<%=path%>/sourcing/biddingprojlist/calprice">
									<!-- 集团 -->
									<input type="hidden" id="pk_group_cal" name="pk_group_cal" value="" />
									<!-- 产品 -->
									<input type="hidden" id="pk_prod_cal" name="pk_prod_cal" value="" />
									<!-- 报价币种 -->
									<input type="hidden" id="pk_currency_cal" name="pk_currency_cal"
										value="" />
									<input type="hidden" id="curName_cal" name="curName_cal"
										value="" />
									<!-- 报价单位 -->
									<input type="hidden" id="pk_unit_cal" name="pk_unit_cal" value="" />
									<!-- 主单位 -->
									<input type="hidden" id="pk_primary_unit_cal"
										name="pk_primary_unit_cal" value="" />
									<!-- 报价数量 -->
									<input type="hidden" id="amount_cal" name="amount_cal" value="" />
									<!-- 主数量 -->
									<input type="hidden" id="primary_amount_cal"
										name="primary_amount_cal" value="" />
									<!-- 换算率 -->
									<input type="hidden" id="conversion_rate_cal"
										name="conversion_rate_cal" value="" />
									<!-- 扣税类别 -->
									<input type="hidden" id="tax_type_cal" name="tax_type_cal" value="" />
									<!-- 税率 -->
									<input type="hidden" id="tax_rate_cal" name="tax_rate_cal" value="" />
									<!-- 折扣率 -->
									<input type="hidden" id="discount_rate_cal"
										name="discount_rate_cal" value="" />
									<!-- 含税单价 -->
									<input type="hidden" id="has_tax_price_cal"
										name="has_tax_price_cal" value="" />
									<!-- 含税金额 -->
									<input type="hidden" id="has_tax_sum_cal" name="has_tax_sum_cal"
										value="" />
									<!-- 含税净价 -->
									<input type="hidden" id="has_tax_net_price_cal"
										name="has_tax_net_price_cal" value="" />
									<!-- 主含税净价 -->
									<input type="hidden" id="primary_hastax_net_price_cal"
										name="primary_hastax_net_price_cal" value="" />
									<!-- 无税单价 -->
									<input type="hidden" id="no_tax_price_cal" name="no_tax_price_cal"
										value="" />
									<!-- 无税金额 -->
									<input type="hidden" id="no_tax_sum_cal" name="no_tax_sum_cal"
										value="" />
									<!-- 无税净价 -->
									<input type="hidden" id="no_tax_net_price_cal"
										name="no_tax_net_price_cal" value="" />
									<!-- 主无税净价 -->
									<input type="hidden" id="primary_notax_net_price_cal"
										name="primary_notax_net_price_cal" value="" />
									<!-- 价税合计 -->
									<input type="hidden" id="price_tax_sum_cal"
										name="price_tax_sum_cal" value="" />
									<input type="hidden" id="tax_sum_cal" name="tax_sum_cal" value="" />
									<!-- 计算字段顺序 (这里拿数量去触发计算)-->
									<input type="hidden" id="property_cal" name="property_cal" value="" />
									<!-- 参数字段 -->
									<input type="hidden" id="isTaxPrior" name="isTaxPrior" value="" />
									<!-- 计算行 -->
									<input type="hidden" id="row_no" name="row_no" value=""/>
								</form>
		                    
		                    	<form name="form" action="<%=path%>/order/saveOrder" method="post">
								    <div class="margin20"></div>
								    <div class="subpage_search" >
								    	<input type="hidden" name="pkWebOrder" value="${orderForm11.pkWebOrder}" />
								    	<input type="hidden" name="pkOrder" value="${orderForm11.pkOrder}" />
								    	<input type="hidden" name="ts" value="${orderForm11.ts}" />
								    	<input type="hidden" name="pkPurCorp" value="${orderForm11.pkPurCorp}" />
								    	<input type="hidden" name="pkPurDept" value="${orderForm11.pkPurDept}" />
								    	<input type="hidden" name="pkPurPsn" value="${orderForm11.pkPurPsn}" />
								    	<input type="hidden" name="pkSupSendAddr" value="${orderForm11.pkSupSendAddr}" />
								    	<input type="hidden" name="pkInvoiceSupp" value="${orderForm11.pkInvoiceSupp}" />
								    	<input type="hidden" name="pkProtocol" value="${orderForm11.pkProtocol}" />
				                        <table border="0" cellpadding="0" cellspacing="0" class="searchtable">
				                            <tr>
				                                <td valign="middle" class="w_1">采购订单号：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="searchtext" name="billNo" type="text" value="${orderForm11.billNo}" readonly="readonly" class="searchtext" />
				                                </td>
				                                <td valign="middle" class="w_1">采购公司：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text1" name="purCorpName" type="text" value="${orderForm11.purCorpName}" readonly="readonly" class="searchtext" />
				                                </td>
				                            </tr>
				                            <tr>
				                            	<td valign="middle" class="w_1">采购部门：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="searchtext" name="purDeptName" type="text" value="${orderForm11.purDeptName}" readonly="readonly" class="searchtext" />
				                                </td>
				                                <td valign="middle" class="w_1">采购员：</td>
				                                <td valign="middle" class="w_2">
				                                   <input id="searchtext" name="purPsnName" type="text" value="${orderForm11.purPsnName}" readonly="readonly" class="searchtext" />
				                                </td>
				                            </tr>
				                            <tr>
				                                <td valign="middle" class="w_1">订单日期：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="ordeDate" type="text" value="${orderForm11.ordeDate}" readonly="readonly" class="searchtext"/>
				                                </td> 
				                                <td valign="middle" class="w_1">响应状态：</td>
				                                <td valign="middle" class="w_2">
				                                     <input type="hidden" value="${orderForm11.responseStatus}" name="responseStatus" />
				                                     <select class="searchtext" disabled="disabled"  >
														<option value=""></option>
														<option value="1" <c:if test="${1==orderForm11.responseStatus}">selected</c:if>>待卖方确认</option>
														<option value="2" <c:if test="${2==orderForm11.responseStatus}">selected</c:if>>接受</option>
														<option value="3" <c:if test="${3==orderForm11.responseStatus}">selected</c:if>>拒绝</option>
														<option value="4" <c:if test="${4==orderForm11.responseStatus}">selected</c:if>>卖方变更中</option>
														<option value="5" <c:if test="${5==orderForm11.responseStatus}">selected</c:if>>卖方已变更</option>
														<option value="6" <c:if test="${6==orderForm11.responseStatus}">selected</c:if>>买方已确认</option>
													 </select>
				                                </td>
				                            </tr>
				                            <tr>
				                                <td valign="middle" class="w_1">供应商发货地址：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="supSendAddrName" type="text" value="${orderForm11.supSendAddrName}" readonly="readonly" class="searchtext" />
				                                </td>
				                                <td valign="middle" class="w_1">发票方：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="invoiceSuppName" type="text" value="${orderForm11.invoiceSuppName}" readonly="readonly" class="searchtext" />
				                                </td>
				                            </tr>
				                            <tr>
				                                <td valign="middle" class="w_1">收付款协议名称：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="protocolName" type="text" value="${orderForm11.protocolName}" readonly="readonly" class="searchtext" />
				                                </td>
				                                <td valign="middle" class="w_1">备注：</td>
				                                <td valign="middle" class="w_2">
				                                    <input id="Text8" name="memo" type="text" value="${orderForm11.memo}" readonly="readonly" class="searchtext" />
				                                </td>
			                                </tr>
			                                <tr><td colspan="4">&nbsp;</td></tr>
				                        </table>
	                    			</div>
				                    <div class="margin20"></div>
								    <div>
								        <table class="tableCss" cellpadding="0" cellspacing="0">
								            <tr class="titleTr">
								            	<th width="165px">产品 </th>
								           	 	<th width="191px">数量</th>
							                	<th width="150px">价格</th>
							                	<th width="150px">金额</th>
							                	<th width="163px" class="th1">计划日期</th>
								            </tr>
								            <c:if test="${orderForm11!=null}">
										        <c:if test="${orderForm11.orderItems!=null}">
													<c:forEach items="${orderForm11.orderItems}" var="orderItemForm" varStatus="index">
														<c:if test="${orderItemForm.index%2==1}">
															<tr align="left" class="contTr-old"  >
														</c:if>
														<c:if test="${orderItemForm.index%2==0}">
															<tr align="left" class="contTr-even">
														</c:if>
															<td class="td3">
																<input type="hidden" name="pkItemOrder" value="${orderItemForm.pkItemOrder}" />
																<input type="hidden" name="pkWebItemOrder" value="${orderItemForm.pkWebItemOrder}" />
																<input type="hidden" name="contractNo" value="${orderItemForm.contractNo}" />
																<input type="hidden" name="pkProd" value="${orderItemForm.pkProd}" />
																<input type="hidden" name="prodName" value="${orderItemForm.prodName}" />
																<input type="hidden" name="module" value="${orderItemForm.module}" />
																<input type="hidden" name="type" value="${orderItemForm.type}" />
																<input type="hidden" name="desc" value="${orderItemForm.desc}" />
																<input type="hidden" name="batchNo" value="${orderItemForm.batchNo}" />
																<input type="hidden" name="pkMeasure" value="${orderItemForm.pkMeasure}" />
																<input type="hidden" name="measureName" value="${orderItemForm.measureName}" />
																<input type="hidden" name="orderNum" value="${orderItemForm.orderNum}" />
																<input type="hidden" name="orderPrice" value="${orderItemForm.orderPrice}" />
																<input type="hidden" name="discount" value="${orderItemForm.discount}" />
																<input type="hidden" name="netTaxPrice" value="${orderItemForm.netTaxPrice}" />
																<input type="hidden" name="priceTaxTotal" value="${orderItemForm.priceTaxTotal}" />
																<input type="hidden" name="rate" value="${orderItemForm.rate}" />
																<input type="hidden" name="taxNum" value="${orderItemForm.taxNum}" />
																<input type="hidden" id="pkCurrency" name="pkCurrency" value="${orderItemForm.pkCurrency}" />
																<input type="hidden" id="curName" name="curName" value="${orderItemForm.curName}" />
																<input type="hidden" name="planArrDate" value="${orderItemForm.planArrDate}" />
																<input type="hidden" name="pkTransferType" value="${orderItemForm.pkTransferType}" />
																<input type="hidden" name="transferName" value="${orderItemForm.transferName}" />
																<input type="hidden" name="pkReceiveAddr" value="${orderItemForm.pkReceiveAddr}" />
																<input type="hidden" name="receiveAddr" value="${orderItemForm.receiveAddr}" />
																<input type="hidden" name="pkProducer" value="${orderItemForm.pkProducer}" />
																<input type="hidden" name="produceFactory" value="${orderItemForm.produceFactory}" />
																<input type="hidden" name="pkQulityLevel" value="${orderItemForm.pkQulityLevel}" />
																<input type="hidden" name="qulityLevel" value="${orderItemForm.qulityLevel}" />
															    <input type="hidden" size="5" name="taxPrice" value="${orderItemForm.taxPrice}" />
																<span class="prodName">${orderItemForm.prodName}</span> <br/>
																<c:if test="${orderItemForm.module!=null && ''!=orderItemForm.module}">规格：${orderItemForm.module}<br/></c:if>
																<c:if test="${orderItemForm.type!=null && ''!=orderItemForm.type}">型号：${orderItemForm.type}<br/></c:if>
																<c:if test="${orderItemForm.batchNo!=null && ''!=orderItemForm.batchNo}">批次号：${orderItemForm.batchNo}<br/></c:if>
																<c:if test="${orderItemForm.contractNo!=null && ''!=orderItemForm.contractNo}">合同号：${orderItemForm.contractNo}<br/></c:if>
																<c:if test="${orderItemForm.produceFactory!=null && ''!=orderItemForm.produceFactory}">生产厂商：${orderItemForm.produceFactory}<br/></c:if>
																<c:if test="${orderItemForm.qulityLevel!=null && ''!=orderItemForm.qulityLevel}">质量等级：${orderItemForm.qulityLevel}<br/></c:if>
<!--																<c:if test="${orderItemForm.desc!=null && ''!=orderItemForm.desc}">描述：${orderItemForm.desc}</c:if>-->
															</td>
															<td class="td3">
																订单数量：<font id="orderNumbj${orderItemForm.index}" class="words-blue">${orderItemForm.orderNum}</font>${orderItemForm.measureName}<br/>
																确认数量：<input type="text" class="input-edit" name="confirmNum" value="${orderItemForm.confirmNum}" 
																	onkeypress="javascript:keyPress(this);"  onkeydown="onKeyDownEnter(this,${orderItemForm.numScale})"
																		onchange="subReduNum(this,${orderItemForm.numScale});javascript:doCalPrice('amount', ${orderItemForm.index});" 
																		 />${orderItemForm.measureName}
															</td>
															<td class="td3">
																订单单价：<font id="taxPricebj${orderItemForm.index}" class="words-blue">${orderItemForm.taxPrice}</font><br/>
																确认单价：<input type="text" class="input-edit" id="confirmPrice" value="${orderItemForm.confirmPrice}" name="confirmPrice"
																	onkeypress="javascript:keyPress(this);" 
																	onchange="subReduNum(this,${orderItemForm.priceScale});javascript:doCalPrice('has_tax_price', ${orderItemForm.index});"/><br/>
																折  扣   率：<font class="words-blue"><span id="discount1${orderItemForm.index}">${orderItemForm.discount}</span></font>%<br/>
																净含税单价：<font class="words-blue"><span id="netTaxPrice1${orderItemForm.index}">${orderItemForm.netTaxPrice}</span></font><br/>
																币种：<font class="words-blue">${orderItemForm.curName}</font><br/>
															</td>
															<td class="td3">
																税率：<font class="words-blue"><span id="rate1${orderItemForm.index}">${orderItemForm.rate}</span></font>%<br/>
																
																价税合计：<font class="words-red-bold"><span id="priceTaxTotal1${orderItemForm.index}">${orderItemForm.priceTaxTotal}</span></font>
																<font class="words-red-bold"><span id="taxNum1${orderItemForm.index}">
																
<!--																${orderItemForm.taxNum}-->
																</span></font><br/>
															</td>
															<td class="td3">
																订单计划到货：<font id="planArrDatebj${orderItemForm.index}" >${orderItemForm.planArrDate}</font>
<%--																订单计划到货：${orderItemForm.planArrDate}<br/>--%>
																<input type="hidden" name="planArrDatedd" value="${orderItemForm.planArrDate}" /><br/>
																确认计划到货：<input type="text" class="input-edit" id="${orderItemForm.pkItemOrder}" name="confirmArrDate" value="${orderItemForm.confirmArrDate}" 
																	onclick="return showCalendar('${orderItemForm.pkItemOrder}', 'y-mm-dd');" readonly="readonly"  />
															</td>
														</tr>
														<c:if test="${orderItemForm.index%2==1}">
															<tr boder='1' class="contTr-old" style="height: 28px">
														</c:if>
														<c:if test="${orderItemForm.index%2==0}">
															<tr boder='1' class="contTr-even" style="height: 28px">
														</c:if>
															<td align="left" colspan="7" class="td2">
																收货地址：<c:if test="${orderItemForm.receiveAddr!=null && ''!=orderItemForm.receiveAddr}">${orderItemForm.receiveAddr}</c:if>
																	     <c:if test="${orderItemForm.receiveAddr==null || ''==orderItemForm.receiveAddr}">暂无</c:if>
															</td>
														</tr>
													</c:forEach>
												</c:if>
											</c:if>
										</table>
								    </div>
								    <div class="margin20"></div>
								    <div>
								        <table width="600" align="center" border="0" cellspacing="0" cellpadding="0">
								            <tr id="order_confirm" align="center">
								                <td>
								                    <input type="button" class="btnscs" value="保存" onclick="saveOrder()"/>
								                    &nbsp;&nbsp;&nbsp;&nbsp;
								                    <c:if test="${orderForm11.pkWebOrder!=null && orderForm11.pkWebOrder!=\"\"}">
									                    <input type="button" class="btnscs" value="取消变更" onclick="deleteOrder('${orderForm11.pkOrder}','${orderForm11.pkWebOrder}')" />
									                    &nbsp;&nbsp;&nbsp;&nbsp;
								                    </c:if>
								                    <input type="button" class="btnscs" value="提交" onclick="submitOrder()" />
								                    &nbsp;&nbsp;&nbsp;&nbsp;
								                    <input type="button" class="btnscs" value="返回" onclick="goback()" />
								                </td>
								            </tr>
								        </table>
								    </div>
								</form>
							</div>
			                <div class="margin20"></div>
						</div>
                    </div>
                    <div class="margin8"></div>
                    <div class="margin8">
                    	<table align="left">
							<tr class="title">
								<td>
									<div id="message" class="msgcolor">${system_err_msg}</div>
								</td>
							</tr>
						</table>
					</div> 
                </div>
            </div>
        <div class="margin20"></div>
</body>